import { useCookies } from "@vueuse/integrations/useCookies"
// 定义存储在Cookie中的标签页数据的key
const TABS_LIST_KEY = 'tabList'
const cookie = useCookies()

//获取TabList
export function getTabList() {
    return cookie.get(TABS_LIST_KEY) || [{
        title: '仪表盘',
        path: "/admin/index"
    }]
}
//存储TabList
export function setTabList(tabList) {
    return cookie.set(TABS_LIST_KEY, tabList)
}
//清除TabList
export function clearTabList() {
    return cookie.remove(TABS_LIST_KEY)
}